package com.xnf.ssmweb.service.impl;

import com.xnf.ssmweb.dao.ProductMapper;
import com.xnf.ssmweb.domain.Product;
import com.xnf.ssmweb.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chendx on 2021/3/26.
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    private ProductMapper productMapper;


    public List<Product> queryProductList() {
        return productMapper.findAll();
    }

    public boolean saveProduct(Product product) {
        return productMapper.saveProduct(product) > 0? true : false;
    }
}
